﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Masterpages/Main.master" AutoEventWireup="true"
    CodeFile="ChangePasswords.aspx.cs" Inherits="User_Employer_ChangeUsername" %>

<%@ Register Src="../../Controls/ContentHolder/Holder1.ascx" TagName="Holder1" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <uc1:Holder1 ID="Holder11" runat="server">
        <ContentTemplate>
            <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
                <asp:View ID="View1" runat="server">
                    <table class="style1">
                        <tr>
                            <td class="style2">
                                <asp:Label ID="Label10" runat="server" Text="نوع جستجو"></asp:Label>
                            </td>
                            <td colspan="3">
                                <asp:RadioButtonList ID="RadioButtonListRole" runat="server" AutoPostBack="True"
                                    CssClass="RadioList" OnSelectedIndexChanged="RadioButtonListRole_SelectedIndexChanged"
                                    RepeatDirection="Horizontal" Width="476px">
                                    <asp:ListItem Value="Advisor">مشاور</asp:ListItem>
                                    <asp:ListItem Value="Surveyor">نقشه بردار</asp:ListItem>
                                    <asp:ListItem Value="Other">دیگران(کارفرما و عامل 4 و بنیاد شهرستان و کاربر عادی)</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                        <tr>
                            <td class="style2">
                                &nbsp;
                            </td>
                            <td align="center" colspan="3">
                                <asp:RadioButtonList ID="RadioButtonListAdvisors" runat="server" AutoPostBack="True"
                                    OnSelectedIndexChanged="RadioButtonListAdvisors_SelectedIndexChanged" RepeatDirection="Horizontal"
                                    Visible="False" Width="310px">
                                    <asp:ListItem Value="hoghooghi">مشاور حقوقی</asp:ListItem>
                                    <asp:ListItem Value="haghighi">مشاور حقیقی</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                        <tr>
                            <td class="style2">
                                &nbsp;
                            </td>
                            <td align="center" colspan="3">
                                <asp:RadioButtonList ID="RadioButtonListSurveyor" runat="server" RepeatDirection="Horizontal"
                                    Visible="False" Width="310px">
                                    <asp:ListItem Value="Advisorhoghooghi">نقشه بردار حقوقی</asp:ListItem>
                                    <asp:ListItem Value="Advisorhaghighi">نقشه بردار حقیقی</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                        <tr>
                            <td class="style2">
                                <asp:Label ID="Label12" runat="server" Text="نام خانوادگی"></asp:Label>
                            </td>
                            <td colspan="3">
                                <asp:TextBox ID="TxtFamily" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="style2">
                                &nbsp;
                            </td>
                            <td>
                                &nbsp;
                            </td>
                            <td>
                                <asp:Button ID="Button3" runat="server" CssClass="MainObject" OnClick="Button3_Click"
                                    Text="جستجو" Width="70px" CausesValidation="False" />
                            </td>
                            <td>
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td class="style2" colspan="4">
                                <asp:Label ID="Lblstatus" runat="server"></asp:Label>
                                <asp:GridView ID="GridViewUsers" runat="server" AutoGenerateColumns="False" BackColor="White"
                                    BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" CssClass="MainObject"
                                    DataKeyNames="UserId" EmptyDataText="فرد مورد نظر یافت نشد." EnableModelValidation="True"
                                    OnRowCommand="GridViewUsers_RowCommand" OnRowDataBound="GridViewUsers_RowDataBound" AllowSorting="True" OnSorting="GridViewUsers_OnSort">
                                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />                                    
                                    <Columns>
                                        <asp:BoundField DataField="Name" HeaderText="نام / نام شرکت" ItemStyle-Width="100" SortExpression="Name"
                                            NullDisplayText="---">
                                            <ItemStyle Width="100px" />                                            
                                        </asp:BoundField>
                                        <asp:BoundField DataField="Family" HeaderText="نام خانوادگی / نام مدیر عامل" SortExpression="Family" NullDisplayText="---">
                                            <ItemStyle Width="100px" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="Address" HeaderText="آدرس" ItemStyle-Width="100" NullDisplayText="---">
                                            <ItemStyle Width="100px" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="Tel" HeaderText="تلفن ثابت" ItemStyle-Width="100" NullDisplayText="---">
                                            <ItemStyle Width="100px" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="Mobile" HeaderText="تلفن همراه" ItemStyle-Width="100"
                                            NullDisplayText="---">
                                            <ItemStyle Width="100px" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="UserName" HeaderText="نام کاربری" ItemStyle-Width="100" SortExpression="UserName"
                                            NullDisplayText="---">
                                            <ItemStyle Width="100px" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="Role" HeaderText="عنوان شغلی" ItemStyle-Width="100" NullDisplayText="---">
                                            <ItemStyle Width="100px" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="UserId" HeaderText="کد کاربری" ItemStyle-Width="100" Visible="False">
                                            <ItemStyle Width="100px" />
                                        </asp:BoundField>
                                        <asp:ButtonField CommandName="Select" ItemStyle-Width="100" Text="تغییر کلمه عبور">
                                            <ItemStyle Width="160px" />
                                        </asp:ButtonField>
                                    </Columns>
                                    <EditRowStyle BackColor="#999999" />
                                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                    <RowStyle BackColor="#CCCCFF" ForeColor="#333333" />
                                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                </asp:GridView>
                            </td>
                        </tr>
                        <tr>
                            <td align="center" class="style2" colspan="4">
                                <asp:Panel ID="PanelEdit" runat="server" Visible="False">
                                    <table class="style1">
                                        <tr>
                                            <td class="style2" width="180">
                                                <asp:Label ID="Label13" runat="server" Text="کلمه عبور"></asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="TextBoxUserName" runat="server" TextMode="Password"></asp:TextBox>
                                            </td>
                                            <td>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBoxUserName"
                                                    ErrorMessage="*"></asp:RequiredFieldValidator>
                                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" Display="Dynamic"
                                                ControlToValidate="TextBoxUserName" ErrorMessage="طول رمز حداقل 6 کاراکتر است"  ValidationExpression=".{6,}"></asp:RegularExpressionValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="style2" width="180">
                                                <asp:Label ID="Label14" runat="server" Text=" تکرار کلمه عبور" Width="102px"></asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="TextBoxUserNameConfirm" runat="server" TextMode="Password"></asp:TextBox>
                                            </td>
                                            <td>
                                                
                                                <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="TextBoxUserNameConfirm"
                                                Display="Dynamic" ControlToValidate="TextBoxUserName" ErrorMessage="کلمه عبور ها یکسان نیست"></asp:CompareValidator>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBoxUserNameConfirm"
                                                    ErrorMessage="*" Display="Dynamic"></asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="style2" width="180">
                                                <asp:Button ID="ButtonReg" runat="server" OnClick="ButtonReg_Click" Text="ثبت" Width="70px" />
                                            </td>
                                            <td colspan="2">
                                                <asp:Button ID="ButtonCancel" runat="server" CausesValidation="False" OnClick="ButtonCancel_Click"
                                                    Text="انصراف" Width="70px" />
                                            </td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                            </td>
                        </tr>
                    </table>
                </asp:View>
            </asp:MultiView>
        </ContentTemplate>
    </uc1:Holder1>
</asp:Content>
